home *** CD-ROM | disk | FTP | other *** search
- ************************************************************************
- *
- * busybox.asm -- Version 3.0 (Main Program)
- *
- * Copyright (c)
- * Apple Computer, Inc. 1986-1990
- * All Rights Reserved.
- *
- * Developer Technical Support Apple II Sample Code
- *
- * This file contains the busybox program.
- *
- ************************************************************************
-
- case on
-
- copy 2/ainclude/e16.types
- copy busybox.equ
-
- mcopy macros/busy.macros
-
- longi on
- longa on
-
- ************************************************************************
-
- main start
-
- phb ;Save caller's data bank pointer.
- phd ;Save caller's direct page pointer.
- phk ;Switch data bank into program bank.
- plb
-
- _TLStartUp ;Start up Tool Locator & Memory Mgr.
- pha ;Find out who we are.
- _MMStartUp
- pla
- sta userID
-
- jsr initGlobals ;Initialize our globals.
-
- pha ;Start up the tools using
- pha ;resources.
- pushword userID
- pea refIsResource
- pushlong #1 ;Resource ID.
- _StartupTools
- PullLong initRef ;Handle used by ShutdownTools.
- bcs startFailed
-
- jsr setupMenus
- jsr setupWindows
- _InitCursor
- jsr mainEvent
-
- startFailed pea refIsHandle ;Now shut them all down.
- pushlong initRef
- _ShutdownTools
-
- pushword userID
- _MMShutDown
- _TLShutDown
- _QuitGS quitParms ;Leave here.
-
- initRef dc i4'0'
-
- quitParms dc i2'0'
- dc i4'0'
- dc i2'0'
-
- end
-